<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //创建一个对象
        var inf = new Object();
        //在对象中添加属性;
        inf.name = '苏凉';
        inf.age = '21';
        inf.QQ_num = '787991021';
        //在对象中修改属性值
        inf.name = 'suliang'
        //删除属性
        delete inf.name;

        var inf1 = {
            name:'suliag',
            age :'18',
            gender:'男'
        };
        // console.log(typeof inf1)
        inf1.name = 'suliang';
        // console.log(inf1)



        var list = new Object();
        list.name = 'suliang';
        list.age = 18;
        list['123'] = '787991021';

        var list2 = new Object();
        list2.fruitname  = '香蕉';
        list2.color = 'yellow';

        list.zfruit = list2; 
        console.log(list)
        
        console.log('name' in list)
        console.log('fruitname' in list2)
        console.log('color' in list)

    </script>
</head>
<body>
    
</body>
</html>